﻿using System;

class NotDivisible
{
    static void Main()
    {
        //Exercise 2.
        //Write a program that prints all the numbers from 1 to N, that are not divisible by 3 and 7 at the same time.

        Console.Write("Enter n:  ");
        int n = int.Parse(Console.ReadLine());

        for (int i = 1; i < n; i++)
        {
            if (i % (3 * 7) == 0)
            {
                continue;
            }
            Console.WriteLine(i);
        }        
    }
}

